From 9a9141768ac8412d05cf1ec156599eb89369db4a Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 16 Jul 2005 18:50:45 +0000 Subject: [PATCH] Minor leak fixes. --- easygps.c | 1 + kml.c | 2 +- nmea.c | 1 + tmpro.c | 6 +++++- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/easygps.c b/easygps.c index bcfab3f03..7d804e3c7 100644 --- a/easygps.c +++ b/easygps.c @@ -120,6 +120,7 @@ data_read(void) break; case 7: wpt_tmp->icon_descr = (char *) pread(); + wpt_tmp->wpt_flags.icon_descr_is_dynamic = 1; break; case 8: /* NULL Terminated (vs. pascal) descr */ bbufp = bbuf; diff --git a/kml.c b/kml.c index c4eea6765..470e47714 100644 --- a/kml.c +++ b/kml.c @@ -266,7 +266,7 @@ static void kml_output_tailer() fprintf(ofd, "\t\n"); } - free(point3d_list); + xfree(point3d_list); point3d_list = NULL; fprintf(ofd, "\n"); diff --git a/nmea.c b/nmea.c index 27b48bd03..af929f483 100644 --- a/nmea.c +++ b/nmea.c @@ -169,6 +169,7 @@ static void nmea_wr_deinit(void) { fclose(file_out); + mkshort_del_handle(mkshort_handle); } void diff --git a/tmpro.c b/tmpro.c index 4940f20cc..5938fe4ed 100644 --- a/tmpro.c +++ b/tmpro.c @@ -109,7 +109,9 @@ data_read(void) */ holder = csv_stringtrim(s, "", 0); if (strlen(holder)) - wpt_tmp->description = holder; + wpt_tmp->description = holder; + else + xfree(holder); break; case 3: wpt_tmp->latitude = atof(s); @@ -142,6 +144,8 @@ data_read(void) holder = csv_stringtrim(s, "", 0); if (strstr(holder, "http:") != NULL) wpt_tmp->url = holder; + else + xfree(holder); break; default: /* whoa! nelly */ -- 2.30.2